from ..utils.db import db
import datetime
from tzlocal import get_localzone



class Posting(db.Model):
    __tablename__ = "posting"
    id = db.Column(db.BIGINT, primary_key=True, autoincrement=True)
    title = db.Column(db.String(256))
    content = db.Column(db.Text)
    user = db.Column(db.BIGINT, default=0)
    parent = db.Column(db.BIGINT, default=0)
    root = db.Column(db.BIGINT, default=0)
    status = db.Column(db.INT, default=1)
    type = db.Column(db.INT, default=1)
    created = db.Column(db.DateTime, default=datetime.datetime.now(get_localzone()))
